import { get } from 'sortablejs';
import request from '/@/utils/request';

/**
 * （不建议写成 request.post(xxx)，因为这样 post 时，无法 params 与 data 同时传参）
 *
 * 登录api接口集合
 */
export function customerManageApi() {
	return {
		getCustomers: (data: object) => {
			return request({
				url: '/api/customer/list',
				method: 'post',
				data,
			});
		},
		createCustomers: (data: object) => {
			return request({
				url: '/api/customer',
				method: 'post',
				data,
			});
		},
		updateCustomers: (data: object) => {
			return request({
				url: '/api/customer/update',
				method: 'post',
				data,
			});
		},
		deleteCustomers: (data: object) => {
			return request({
				url: '/api/customer/delete',
				method: 'post',
				data,
			});
		},
		getCustomerCards: (data: object) => {
			return request({
				url: 'api/member-card/customer-cards',
				method: 'post',
				data,
			});
		},
		createCustomerCards: (data: object) => {
			return request({
				url: 'api/member-card/create',
				method: 'post',
				data,
			});
		},
		getTransactionRecords: (data: object) => {
			return request({
				url: 'api/member-card/transactions',
				method: 'post',
				data,
			});
		},
		// 消费管理
		consumption: (data: object) => {
			return request({
				url: 'api/member-card/consume',
				method: 'post',
				data,
			});
		},
		// 充值
		recharge: (data: object) => {
			return request({
				url: 'api/member-card/recharge',
				method: 'post',
				data,
			});
		},
		// 删除会员卡
		deleteCard: (data: object) => {
			return request({
				url: 'api/member-card/delete',
				method: 'post',
				data,
			});
		},



		
	};
}
